package com.wryyyyy.mapper;

import com.wryyyyy.dto.AddLabelDTO;
import com.wryyyyy.entity.DishLabel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wryyyyy
 * @since 2023-11-12
 */
public interface DishLabelMapper extends BaseMapper<DishLabel> {
    Integer insertBatch(@Param("dishId") String dishId, @Param("labels") List<AddLabelDTO> labels);

    @Select("select * from tb_dish_label where dish_id = #{dishId}")
    List<DishLabel> selectByDish(@Param("dishId") String dishId);
}
